{% macro render_pager(pagination) %}
  <div class="am-u-lg-12 am-cf">
    <div class="am-fr">
      <ul class="am-pagination tpl-pagination">
        <li {% if not pagination.has_prev %} class="am-disabled"{% endif %}>
          <a class="page-link" href="{{ url_for(request.endpoint, page=pagination.prev_num) }}">&laquo;</a>
        </li>
        {% for page in pagination.iter_pages() %}
            {% if page %}
                {% if page != pagination.page %}
                    <li>
                      <a href="{{ url_for(request.endpoint, page=page) }}">{{ page }}</a>
                    </li>
                {% else %}
                    <li class="am-active">
                        <a href="#">{{ page }}</a>
                    </li>
                {% endif %}
            {% elif ellipses != None %}
                <li class="am-disabled"><a class="page-link" href="#">&hellip;</a></li>
            {% endif %}
        {% endfor %}
        <li {% if not pagination.has_next %}class="am-disabled"{% endif %}>
          <a href="{{ url_for(request.endpoint, page=pagination.next_num) }}">&raquo;</a>
        </li>
      </ul>
    </div>
  </div>
{%- endmacro %}
